// clang-format off
#include "types.h"
#include "user.h"
#include "stat.h"
// clang-format on

void periodic();

int main(int argc, char *argv[]) {
    int i;
    printf(1, "alarmtest starting\n");
    alarm(10, periodic);
    for (i = 0; i < 500 * 500000; i++) {
        if ((i % 250000) == 0)
            write(2, ".", 1);
    }
    exit();
}

void periodic() { printf(1, "alarm!\n"); }